<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ClassLessonTeacher extends Model
{
    //
    protected $fillable = ['l_code', 'tc_code', 'c_code', 'year', 'week', 'sort'];
    public static $week = [1=>'星期一',2=>'星期二',3=>'星期三',4=>'星期四',5=>'星期五',6=>'星期六',7=>'星期日'];
    public static $sort = ['早自习','1','2','3','4','5','6','7','8','晚修1','晚修2','晚修3'];
    public function class()
    {
        return $this->hasOne(Classes::class, 'c_code', 'c_code');
    }
    public function teacher()
    {
        return $this->hasOne(Teacher::class, 'tc_code', 'tc_code');
    }
    public function lesson()
    {
        return $this->hasOne(Lesson::class, 'l_code', 'l_code');
    }
}
